using System;
using System.Text;
using TccAg.VO;
using TccAg.DA;
using System.Data;
using System.Collections;
using System.Collections.Generic;
using NeoLib2k8.Log;

namespace TccAg.BR
{
    public class GradeHorariaAcademicaBR
    {
        private GradeHorariaAcademicaDA gradehorariaacademicaDA = new GradeHorariaAcademicaDA();

        //INSERIR 
        public int inserir(GradeHorariaAcademicaVO gradehorariaacademica)
        {
            try
            {
                return gradehorariaacademicaDA.inserir(gradehorariaacademica);
            }
            catch (Exception ex)
            {
                Log.LogWrite(ex.ToString(), Variaveis.GetInstance().LogVO);
                throw ex;
            }
        }

        //ATUALIZAR 
        public int atualizar(GradeHorariaAcademicaVO gradehorariaacademica)
        {
            try
            {
                return gradehorariaacademicaDA.atualizar(gradehorariaacademica);
            }
            catch (Exception ex)
            {
                Log.LogWrite(ex.ToString(), Variaveis.GetInstance().LogVO);
                throw ex;
            }
        }

        //EXCLUIR 
        public int excluir(GradeHorariaAcademicaVO gradehorariaacademica)
        {
            try
            {
                return gradehorariaacademicaDA.excluir(gradehorariaacademica);
            }
            catch (Exception ex)
            {
                Log.LogWrite(ex.ToString(), Variaveis.GetInstance().LogVO);
                throw ex;
            }
        }

        //LOAD ALL 
        public List<GradeHorariaAcademicaVO> loadAll()
        {
            try
            {
                return gradehorariaacademicaDA.loadAll();
            }
            catch (Exception ex)
            {
                Log.LogWrite(ex.ToString(), Variaveis.GetInstance().LogVO);
                throw ex;
            }
        }

        //LOAD BY PK
        public GradeHorariaAcademicaVO loadByPk(GradeHorariaAcademicaVO gradehorariaacademica)
        {
            try
            {
                return gradehorariaacademicaDA.loadByPk(gradehorariaacademica);
            }
            catch (Exception ex)
            {
                Log.LogWrite(ex.ToString(), Variaveis.GetInstance().LogVO);
                throw ex;
            }
        }

        //LOAD BY FK
        public GradeHorariaAcademicaVO loadByFk(GradeHorariaAcademicaVO gradehorariaacademica)
        {
            try
            {
                return gradehorariaacademicaDA.loadByFk(gradehorariaacademica);
            }
            catch (Exception ex)
            {
                Log.LogWrite(ex.ToString(), Variaveis.GetInstance().LogVO);
                throw ex;
            }
        }

        //DATATABLE LOAD ALL 
        public DataTable dataTableLoadAll()
        {
            try
            {
                return gradehorariaacademicaDA.dataTableLoadAll();
            }
            catch (Exception ex)
            {
                Log.LogWrite(ex.ToString(), Variaveis.GetInstance().LogVO);
                throw ex;
            }
        }

    }
}
